%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	call	l_gchar
	push	hl
	ld	hl,%2	;const
=
	ld	de,sp+%1
	ld	a,(de)	;l_gchar
	call	l_sxt
	push	hl
	ld	hl,%2	;const

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	call	l_gchar
=
	ld	de,sp+%1
	ld	a,(de)	;l_gchar
	call	l_sxt

%check 0 <= %1 <= 255
	ld	bc,%1
	add	hl,bc
	call	l_gchar
=
	ld	de,hl+%1
	ld	a,(de)	;l_gchar
	call	l_sxt

	inc	hl
	inc	hl
	inc	hl
	call	l_gchar
=
	ld	de,hl+3
	ld	a,(de)	;l_gchar
	call	l_sxt

	inc	hl
	inc	hl
	call	l_gchar
=
	ld	de,hl+2
	ld	a,(de)	;l_gchar
	call	l_sxt

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	push	hl
	call	l_gint	;%9
	%2c	hl
	pop	de
	ld	(de),hl
=
	ld	de,sp+%1
	ld	hl,(de)
	%2c	hl
	ld	(de),hl

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	push	hl
	call	l_gint	;
	%2c	hl
	pop	de
	ld	(de),hl
=
	ld	de,sp+%1
	ld	hl,(de)
	%2c	hl
	ld	(de),hl

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	push	hl
	call	l_gint	;%9
=
	ld	de,sp+%1
	push	de
	ld	hl,(de)	;l_gint

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	call	l_gint	;
	pop	de
=
	ld	de,sp+%1
	ld	hl,(de)
	pop	de

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	call	l_gint	;%9
=
	ld	de,sp+%1
	ld	hl,(de)	;l_gint

%check 0 <= %1 <= 255
	ld	bc,%1
	add	hl,bc
	call	l_gint	;%9
=
	ld	de,hl+%1
	ld	hl,(de)	;l_gint

	inc	hl
	inc	hl
	inc	hl
	call	l_gint	;%9
=
	ld	de,hl+3
	ld	hl,(de)	;l_gint

	inc	hl
	inc	hl
	call	l_gint	;%9
=
	ld	de,hl+2
	ld	hl,(de)	;l_gint

	inc	hl
	call	l_gint	;%9
=
	ld	de,hl+1
	ld	hl,(de)	;l_gint

	call	l_gint
=
	ex	de,hl
	ld	hl,(de)	;l_gint

	call	l_gint	;%9
=
	ex	de,hl
	ld	hl,(de)	;l_gint

	ld	hl,_%1
	push	hl
	call	l_gint	;
	%2c	hl
	pop	de
	ld	(de),hl
=
	ld	de,_%1
	ld	hl,(de)
	%2c	hl
	ld	(de),hl

	ld	de,sp+%1
	ld	hl,(de)
	ex	de,hl
	ld	hl,%2	;const
	add	hl,sp
	call	l_gint	;%9
	ld	c,e
	ld	b,d
=
	ld	de,sp+%1
	ld	hl,(de)
	ld	c,e
	ld	b,d
	ld	de,sp+%2
	ld	hl,(de)

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	call	l_gintspsp	;
	ld	de,%2
=
	ld	de,sp+%1
	ld	hl,(de)
	push	hl
	ld	de,%2

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	call	l_glong%2
=
	ld	de,sp+%1
	ex	de,hl
	call	l_glong%2

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	push	hl
	call	l_glong%2
=
	ld	de,sp+%1
	ex	de,hl
	push	hl
	call	l_glong%2

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	ld	de,%2	;const
	ex	de,hl
	ld	(de),hl
=
	ld	de,sp+%1
	ld	hl,%2	;const
	ld	(de),hl

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	ld	e,(hl)
	inc	hl
	ld	d,(hl)
	push	de
	ld	hl,%2
=
	ld	de,sp+%1
	ld	hl,(de)
	push	hl
	ld	hl,%2

	pop	bc
	pop	hl
	push	hl
	push	bc
	pop	de
=
	ld	de,sp+2
	ld	hl,(de)
	pop	de

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	ld	e,(hl)
	inc	hl
	ld	d,(hl)
	inc	hl
=
	ld	de,sp+%1
	ex	de,hl
	ld	e,(hl)
	inc	hl
	ld	d,(hl)
	inc	hl

%check 0 <= %1 <= 255
	ld	hl,%1	;const
	add	hl,sp
	ex	de,hl
	ld	hl,%2	;const
=
	ld	de,sp+%1
	ld	hl,%2	;const

%check 0 <= %2 <= 255
	ld	de,sp+%1
	ld	hl,%2	;const
	add	hl,sp
	ex	de,hl
=
	ld	de,sp+%1
	ex	de,hl
	ld	de,sp+%2

	call	l_pint
=
	ld	(de),hl	;l_pint

	ld	de,%1
	call	l_sub
=
	ld	bc,hl
	ld	hl,%1
	sub	hl,bc	;l_sub

	pop	hl
	call	l_sub
=
	ex	de,hl
	pop	bc
	sub	hl,bc	;l_sub

	pop	de
	call	l_sub
=
	ld	bc,hl
	pop	hl
	sub	hl,bc	;l_sub

	call	l_sub
=
	ex	de,hl
	ld	bc,de
	sub	hl,bc	;l_sub

%title Clear up a misoptimisation
	push	de
	ld	hl,(de)	;l_gint
	%2c	hl
	pop	de
	ld	(de),hl	;l_pint
=
	ld	hl,(de)	;l_gint
	%2c	hl
	ld	(de),hl	;l_pint

	ld	hl,%1	;const
	add	hl,sp
	ld	de,%2	;const
	ex	de,hl
	ld	(de),hl	;l_pint
=
	ld	de,sp+%1
	ld	hl,%2	;const
	ld	(de),hl
